Change signature opts to include type, cleanup error handling
authorColin Walters <walters@verbum.org>
Sun, 12 Apr 2020 18:04:06 +0000 (18:04 +0000)
committerColin Walters <walters@verbum.org>
Wed, 15 Apr 2020 22:07:11 +0000 (22:07 +0000)
commit8e7aea4473375a12ad479d910a1e20fabe23ed18
tree4167df4652fc0857a810c2b1dec7631016c2e09b
parentfd55deb0f7f604d8866024540eef25fa370620bb
Change signature opts to include type, cleanup error handling

Previously we would pass the `verification-key` and `verification-file`
to all backends, ignoring errors from loading keys until we
found one that worked.

Instead, change the options to be `verification-<engine>-key`
and `verification-<engine>-file`, and then
rework this to use standard error handling; barf explicitly if
we can't load the public keys for example.  Preserve
the semantics of accepting the first valid signature.  The
first signature error is captured, the others are currently
compressed into a `(and %d more)` prefix.

And now that I look at this more closely there's a lot of
duplication between the two code paths in pull.c for verifying;
will dedup this next.
src/libostree/ostree-repo-pull.c
src/libostree/ostree-sign-ed25519.c
tests/test-local-pull.sh
tests/test-signed-pull-summary.sh
tests/test-signed-pull.sh